1. Field of the Invention
The present invention relates to a semiconductor memory including CAM (Content Addressable Memory) cells.
2. Description of Related Art
Recently, a semiconductor memory composed of T-CAM (Ternary-Content Addressable Memory) cells has come to be used in a search system of a network address path. A configuration of a T-CAM cell is shown in FIG. 12 of a Relevant Reference 1, for example. It includes two memory cells with a RAM structure for expressing ternary data xe2x80x9c0xe2x80x9d, xe2x80x9c1xe2x80x9d and xe2x80x9cX (Don""t care)xe2x80x9d. Each memory cell is connected to a pair of search lines for searching for binary data xe2x80x9c0xe2x80x9d and xe2x80x9c1xe2x80x9d. In addition, each CAM cell is connected to a match line for indicating a match result between the search data on the search lines and the memory data in the memory cells.
Next, the outline of the search operation will be described.
First, the match line is charged to a high level, and one of the search data xe2x80x9c0xe2x80x9d and xe2x80x9c1xe2x80x9d is set on the search lines. Subsequently, matching is carried out between the search data on the search lines and the memory data in the memory cells (one of the values xe2x80x9c0xe2x80x9d, xe2x80x9c1xe2x80x9d and xe2x80x9cXxe2x80x9d). If the two data match, the match line is maintained at the high level, and a decision is made as xe2x80x9cmatchxe2x80x9d as the search result. In other words, a decision is made that the search data is present at the address having that memory data. On the contrary, if the two data do not match, the match line is discharged to a low level, and a decision is made that the search result is xe2x80x9cmismatchxe2x80x9d. A series of the search operation is repeated in search cycles synchronizing to an external clock.
Relevant Reference 1: Japanese patent application laid-open No. 2002-237190.
The conventional semiconductor memory composed of the CAM cells has a problem of consuming very large power in the search operation because it activates all the search lines at every search cycle.
The problem will be described in more detail by way of example.
FIG. 9 is a timing chart illustrating a search operation of a semiconductor memory composed of the conventional T-CAM cells. In FIG. 9, xe2x80x9cCLKxe2x80x9d designates the external clock supplied from the outside. The search operation is carried out in search cycles synchronized to the external clock. In FIG. 9, xe2x80x9cRETRIEVAL SEARCH DATAxe2x80x9d designates the search data that is being searched for. In addition, xe2x80x9cAMPxe2x80x9d, xe2x80x9cOUTPUT LINExe2x80x9d and xe2x80x9cPRECHARGExe2x80x9d designate the operation of an amplifier for amplifying the output from the match line constituting a search result, the output value of the amplifier, and the state of the match line precharged to the high level before the search operation, respectively.
As illustrated in FIG. 9, the search lines repeat an inversion to either all xe2x80x9c0xe2x80x9d or all xe2x80x9c1xe2x80x9d at every search cycle in response to the search data supplied from the outside in the search operation. When the data values of all the search lines are inverted at every search cycle, the power consumption for executing a search instruction becomes very large. For example, a 9 M-bit class T-CAM consumes power of about 10 watts for a 100 MHz search cycle.
The present invention is implemented to solve the foregoing problem. It is therefore an object of the present invention to provide a semiconductor memory capable of reducing the power consumption by decreasing the activation frequency of the search lines in the search operation.
According to a first aspect of the present invention, there is provided a semiconductor memory comprising: a memory cell block that consists of L memory cells each for storing 1-bit digital value, where L is an integer equal to mth power of 2, and stores memory data expressing a combination of digital values stored in the individual memory cells in terms of an M-bit digital value, where M is a positive integer equal to or greater than two; search lines on which 1-bit digital values are set to be matched with the digital values stored in the memory cells; a search data setting section for setting search data expressing the combination of the L-bit digital values in terms of the M-bit digital value by setting the 1-bit digital values on the L search lines; a match section for making a match/mismatch decision between the memory data and the search data by matching the digital value stored in the memory cells constituting the memory cell block with the digital value set on the search lines connected to the memory cells; and an output section for outputting a decision result of the match section. Thus, it can reduce the activation frequency of the search lines during the search operation, thereby offering an advantage of being able to reduce the power consumption in the search operation.